#include<iostream>
#include<string>
#include<jsoncpp/json/json.h>

int main()
{
    Json::Value root;
    root["k1"]=100;
    root["k2"]=200;

    Json::FastWriter writer;
    //序列化字符串
    std::string s=writer.write(root);

    std::cout<<s<<std::endl;

}